import axios from 'axios';
import { IRootObject } from '../interface/ICheckList';
import { ISearchOptions } from '../interface/ISearchOptions';
import { IPageOptions } from '../interface/IPageOptions';
import checkList from '../../../assets/mockData/statements-list/list.json';

/** 查询列表 */
export const fetchCheckList = async (
  data: ISearchOptions & IPageOptions
): Promise<IRootObject> => {
  return checkList;
};

/**
 * axios示例（post）
 * @param storeId
 */
export const addPartCategory = (
  partType: string,
  categoryName: string
): Promise<ISearchOptions[]> => {
  return axios
    .post(`/excellent/quote?partType=${partType}&categoryName=${categoryName}`)
    .then(res => res.data);
};

/**
 * axios示例（get）
 */
export const fetchPartCategoryCity = () => {
  return axios.get(``).then(res => res.data);
};
